package com.redeemer150.oj.judge.codesanbox;


import com.redeemer150.oj.judge.codesanbox.impl.ExampleCodeSandbox;
import com.redeemer150.oj.judge.codesanbox.impl.RemoteCodeSandbox;
import com.redeemer150.oj.judge.codesanbox.impl.ThirdPartyCodeSandbox;

/**
 * @author 黄宽亮
 * @version 1.0
 * @description: TODO
 * @date 2025/5/19 16:45
 */
public class CodeSandboxFactory {
    public static CodeSandbox newInstance(String type){
        switch (type){
            case "example":
                return new ExampleCodeSandbox();
            case "third":
                return new ThirdPartyCodeSandbox();
            case "remote":
                return new RemoteCodeSandbox();
            default:
                return new ExampleCodeSandbox();
        }

    }
}
